home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 13 / Network Support Encyclopedia (Novell Inc.)(1991).ISO / download / ctrlbk.txt < prev    next >
Text File  |  1989-06-20  |  1KB  |  32 lines

  1. Actually, just "hook"ing interrupt 01BH (the Ctrl-BREAK) interrupt will not 
  2. provide adequate protection.  A Ctrl-C is NOT a Ctrl-BREAK, therefore it goes 
  3. into the normal keyboard buffer, which is read through INT 016H.  You'd have to 
  4. hook both interrupts (or just disable the keyboard interrupt at the 8259) to do 
  5. what you're trying to do.  Actually, the 8259 approach is real simple if you 
  6. want to give it a try.  The programs would look something like this: 
  7.  
  8.     KBOFF.COM - Disable keyboard input 
  9.  
  10.                 Cli 
  11.                 In      Al,021H 
  12.                 Or      AL,002H 
  13.                 Out     021H,AL 
  14.                 Sti 
  15.                 Mov     AX,04C00H 
  16.                 Int     021H 
  17.                 Int     020H 
  18.  
  19.     KBON.COM - Enable keyboard input 
  20.  
  21.                 Cli 
  22.                 In      AL,021H 
  23.                 And     AL,0FDH 
  24.                 Out     021H,AL 
  25.                 Sti 
  26.                 Mov     AX,04C00H 
  27.                 Int     021H 
  28.                 Int     020H 
  29.  
  30.     Just remember that is something fails between KBOFF and KBON, you won't be
  31. able to do anything about it, not even Ctrl-Alt-DEL! 
  32.